package nuc.edu.mapper;

import nuc.edu.entities.Employee;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;


/**
 * Created by 张朝亮
 */
public interface EmployeeMapper {
	/**
	 * 保存员工
	 * @param employee
	 */
	public void save(Employee employee);

	/**
	 * 修改员工
	 * @param employee
	 */
	public void update(Employee employee);

	/**
	 * 查询所有的员工
	 * @return
	 */
	public Collection<Employee> getAll();

	/**
	 * 通过id查询员工
	 * @param id
	 * @return
	 */
	public Employee get(Integer id);

	/**
	 * 通过id删除员工
	 * @param id
	 */
	public void delete(Integer id);

	/**
	 * 通过Did查询所有的员工
	 * @param did
	 * @return
	 */
	public List<Employee> getEmployeeByDid(Integer did);
}
